function plotVisibility_i(IC,T,u,FN,CameraAngleCapability,startTime,DU,VU)
options=odeset('RelTol',1e-13,'AbsTol',1e-13);

[row,col,~] = size(FN);
dt = 0.01;
[t,S] = ode113(@(t,S)CR3BP_n(t,S,u),[0:dt:T],IC,options);
S = S';

S_i = zeros(size(S));
for ii = 1:length(S)
    S_i(:,ii) = C2I_primary(S(:,ii),u,DU,VU,t(ii)+startTime);
end

 parfor k = 1:row
        for n = 1:col
            normvec = [FN(k,n,1);FN(k,n,2);FN(k,n,3)];
            for j = 1:length(t)
                posvec = S_i(1:3,j);
                angle_temp = acosd(dot(normvec,posvec)/(norm(normvec)*norm(posvec)));
                if angle_temp < CameraAngleCapability
                    visibility(k,n) = 1;
                    break
                end
            end
        end
    end


ImageBinary = mat2gray(visibility);
% figure;
% imshow(ImageBinary)
Window = figure('OuterPosition',[100,100,1500,800]); hold on;
mesh(ImageBinary,'EdgeColor','none','FaceColor','flat');
xlabel('Longitude')
ylabel('Latitude')
title('Sun Visibility')
xticks(linspace(0,row,5));
xticklabels({'180W','90W','0','90E','180E'});
yticks(linspace(0,col,5))
yticklabels({'90S','45S','0','45N','90N'});
xlim([1,row]);
ylim([1,col])

Window = figure('OuterPosition',[100,100,1500,800]); hold on;
contour(ImageBinary,[1,1]);
xlabel('Longitude')
ylabel('Latitude')
title('Sun Visibility')
xticks(linspace(0,row,5));
xticklabels({'180W','90W','0','90E','180E'});
yticks(linspace(0,col,5))
yticklabels({'90S','45S','0','45N','90N'});
xlim([1,row]);
ylim([1,col])


end